<?php

class Ban_model extends MY_Model
{
    protected $_table = 'chatban';   
    protected $primary_key = 'banid';   
    
    function ban_for_addr_($addr)
    {
    	$this->db->select("banid,comment");
    	$this->db->set('unix_timestamp(dtmtill) >', 'unix_timestamp(CURRENT_TIMESTAMP)', false);
    	$this->db->where('address', $addr);
    	return $this->db->get($this->_table)->row_array();
    }
}
